package ch01.observer;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by zc on 2016/10/25.
 */
public class BallisticsLabel implements Observer {

    public BallisticsLabel(Tpeak tpeak) {
        tpeak.addObserver(this);
    }

    @Override
    public void update(Observable o, Object arg) {
        System.out.println("value: " + ((Tpeak)o).getValue());
    }
}
